<?php
$messages = $this->messages;
$classes = array(
    'notice' => 'alert alert-success',
    'error' => 'alert alert-error',
    'warning' => 'alert alert-block',
);
?>

<?php foreach ($messages as $key => $list): ?>
    <div class="<?php echo $classes[$key] ?>">
        <?php foreach ($list as $message): ?>
        <?php echo $this->escape($message); ?>
        <?php endforeach; ?>
    </div>
<?php endforeach; ?>